package cn.walls1717.wallsmall.search.vo;

import cn.walls1717.wallsmall.common.pojo.to.es.SkuEsModel;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * 商品响应信息
 *
 * @author walls1717
 * @since 2022/11/06 13:18
 **/
@Data
public class SearchResult {
    /** 所有商品信息 */
    private List<SkuEsModel> products;
    /** 当前页 */
    private Integer pageNum;
    /** 总记录数 */
    private Long total;
    /** 总页码 */
    private Integer totalPages;
    /** 分页页码 */
    private List<Integer> pageNavs;
    /** 品牌信息 */
    private List<BrandVO> brands;
    /** 分类信息 */
    private List<CatalogVO> catalogs;
    /** 属性信息 */
    private List<AttrVO> attrs;
    /** 面包屑导航 */
    private List<NavVO> navs = new ArrayList<>();
    /** 哪些属性id已经被筛选 */
    private List<Long> attrIds = new ArrayList<>();

    @Data
    public static class NavVO {
        private String navName;
        private String navValue;
        private String link;
    }


    @Data
    public static class BrandVO {
        private Long brandId;
        private String brandName;
        private String brandImg;
    }

    @Data
    public static class CatalogVO {
        private Long catalogId;
        private String catalogName;
    }

    @Data
    public static class AttrVO {
        private Long attrId;
        private String attrName;
        private List<String> attrValue;
    }
}
